package com.inspectortime.webapp.inspector.fee;

import java.util.List;

import com.inspectortime.domain.InspectorCompany;
import com.inspectortime.domain.pricing.BaseFeeWithAdjustersCalculator;
import com.inspectortime.domain.pricing.PricingPlanType;


public abstract class FeeWizardCommonHelper {

	private PricingPlanType type;
	
	private String distanceInMilesCenterZip;
	
	private double distanceInMilesFeeIncreasePerMile;
	
	private int distanceInMilesLimit;

	public int getDistanceInMilesLimit() {
		return distanceInMilesLimit;
	}

	public void setDistanceInMilesLimit(int distanceInMilesLimit) {
		this.distanceInMilesLimit = distanceInMilesLimit;
	}

	public String getDistanceInMilesCenterZip() {
		return distanceInMilesCenterZip;
	}

	public void setDistanceInMilesCenterZip(String distanceInMilesCenterZip) {
		this.distanceInMilesCenterZip = distanceInMilesCenterZip;
	}

	public double getDistanceInMilesFeeIncreasePerMile() {
		return distanceInMilesFeeIncreasePerMile;
	}

	public void setDistanceInMilesFeeIncreasePerMile(
			double distanceInMilesFeeIncreasePerMile) {
		this.distanceInMilesFeeIncreasePerMile = distanceInMilesFeeIncreasePerMile;
	}

	public FeeWizardCommonHelper() {

	}

	public PricingPlanType getType() {
		return type;
	}

	public void setType(PricingPlanType type) {
		this.type = type;
	}
	
	public abstract List<BaseFeeWithAdjustersCalculator> createFeeCalculators();

	public abstract void populateFromCalculators(InspectorCompany company);
	
	public void populateFromCompany(InspectorCompany company) {
		this.setDistanceInMilesCenterZip(company.getDistanceInMilesCenterZip());
		this.setDistanceInMilesFeeIncreasePerMile(company.getDistanceInMilesFeeIncreasePerMile());
		this.setDistanceInMilesLimit(company.getDistanceInMilesLimit());
	}
		
	public abstract void sortEntries();
	
}
